Skip to content

PostgreSQL 18#2489

Open
yorickdowne wants to merge 1 commit intoethstaker:mainfrom
yorickdowne:postgres-18
Open

PostgreSQL 18#2489
yorickdowne wants to merge 1 commit intoethstaker:mainfrom
yorickdowne:postgres-18

Conversation

@yorickdowne
Copy link
Collaborator

@yorickdowne yorickdowne commented Mar 12, 2026

What I did

PostgreSQL 18.3 was released February 26th, and I consider 18 to be stable now.

This will prompt users to migrate to 18.

PostgreSQL has changed where it expects data. The cleanest way I found to handle this is to set PG_DATA manually
and mount the volume outside of /var/lib/postgresql, to avoid issues that arise from conflicts between old and new.
Old: Mount to /var/lib/postgresql/data
New: Mount to /var/lib/postgresql, data is a symlink, DB is in <MAJOR_VERSION>/docker

I set PGDATA=/var/lib/postgres-data and mount the volume to there. That allows existing users to work and have slashing protection, it allows new setups, and it allows migration.

Also strengthened error handling.

Pucker factor is high: A fatal bug here gets people slashed.

This is the third migration since the code was introduced. First was 15->16, second 16->17, now 17->18.

@yorickdowne yorickdowne marked this pull request as draft March 12, 2026 19:05
@yorickdowne yorickdowne requested a review from pietjepuk2 March 14, 2026 12:31
@yorickdowne yorickdowne marked this pull request as ready for review March 14, 2026 12:31
@yorickdowne yorickdowne force-pushed the postgres-18 branch 4 times, most recently from cb82969 to 5df9e43 Compare March 14, 2026 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant